﻿using System;
using YunZuan.Models.Attributes;
using YunZuan.Models.Entities;

namespace YunZuan.Models
{
    [Table(TableName = "yz_user", PrimaryKey = "UserID")]

    public class UserInfo : BaseEntity
    {
        private int _userID;

        private decimal _discount;//decimal 10-26

        public decimal Discount
        {
            get { return _discount; }
            set
            {
                this.ChangeNotify<decimal>("Discount", value, ref _discount);
            }
        }

        private decimal _fancyDiscount;

        public decimal FancyDiscount
        {
            get { return _fancyDiscount; }
            set
            {
                this.ChangeNotify<decimal>("FancyDiscount", value, ref _fancyDiscount);
            }
        }


        private string _userName;


        #region 公共属性

        [Column(IsAutoIncrement = true)]

        public int UserID
        {
            get
            {
                return _userID;
            }
            set
            {
                this.ChangeNotify<int>("UserID", value, ref _userID);
            }
        }

        public string UserName
        {
            get
            {
                return _userName;
            }
            set
            {
                this.ChangeNotify<string>("UserName", value, ref _userName);
            }
        }

        #endregion



        private string _userPassword;

        public string UserPassword
        {
            get { return _userPassword; }
            set {
                this.ChangeNotify<string>("UserPassword", value, ref _userPassword);
            }
        }
        private string _roleId;

        public string RoleID
        {
            get { return _roleId; }
            set
            {
                this.ChangeNotify<string>("RoleID", value, ref _roleId);
            }
        }
        private string _comments;

        public string Comments
        {
            get { return _comments; }
            set { 
            this.ChangeNotify<string>("Comments", value, ref _comments);
            }
        }
        private short? _sex;

        public short? Sex
        {
            get { return _sex; }
            set { this.ChangeNotify<short?>("Sex", value, ref _sex); }
        }

        private string _mobile;

        public string Mobile
        {
            get { return _mobile; }
            set { 
            this.ChangeNotify<string>("Mobile", value, ref _mobile);

            }
        }
        private string _email;

        public string Email
        {
            get { return _email; }
            set { 
            this.ChangeNotify<string>("Email", value, ref _email);

            }
        }
        private string _qq;

        public string Qq
        {
            get { return _qq; }
            set { 
            this.ChangeNotify<string>("Qq", value, ref _qq);

            }
        }
        private string _skype;

        public string Skype
        {
            get { return _skype; }
            set { 
            this.ChangeNotify<string>("Skype", value, ref _skype);

            }
        }


        private int? _sysStatus;

        public int? SysStatus
        {
            get { return _sysStatus; }
            set { 
            this.ChangeNotify<int?>("SysStatus", value, ref _sysStatus);

            }
        }

        private DateTime _createTime;

        public DateTime CreateTime
        {
            get { return _createTime; }
            set { 
            this.ChangeNotify<DateTime>("CreateTime", value, ref _createTime);

            }
        }


        private DateTime _updateTime;

        public DateTime UpdateTime
        {
            get { return _updateTime; }
            set
            {
                this.ChangeNotify<DateTime>("UpdateTime", value, ref _updateTime);

            }
        }

        private string _realName;

        public string RealName
        {

            get { return _realName; }
            set { 
            this.ChangeNotify<string>("RealName", value, ref _realName);

            }
        }

        private DateTime _lastActiveTime;

        public DateTime LastActiveTime
        {
            get { return _lastActiveTime; }
            set { 
            this.ChangeNotify<DateTime>("LastActiveTime", value, ref _lastActiveTime);

            }
        } 

        private int _loginCount;

        public int LoginCount
        {
            get { return _loginCount; }
            set
            {
                this.ChangeNotify<int>("LoginCount", value, ref _loginCount);

            }
        }

        //活跃地区
        private string _activeArea;

        public string ActiveArea
        {
            get { return _activeArea; }
            set
            {
                this.ChangeNotify<string>("ActiveArea", value, ref _activeArea);
            }
        }

        //活跃IP
        private string _activeIP;

        public string ActiveIP
        {
            get { return _activeIP; }
            set
            {
                this.ChangeNotify<string>("ActiveIP", value, ref _activeIP);
            }
        }

        //  员工部门
        private string _department;

        public string Department
        {
            get { return _department; }
            set
            {
                this.ChangeNotify<string>("Department", value, ref _department);
            }
        }


        private string _rapnetAccount;

        public string RapnetAccount
        {
            get { return _rapnetAccount; }
            set
            {
                this.ChangeNotify<string>("RapnetAccount", value, ref _rapnetAccount);
            }
        }
        private int? _defaultFlag;

        public int? DefaultFlag
        {
            get { return _defaultFlag; }
            set
            {
                this.ChangeNotify<int?>("DefaultFlag", value, ref _defaultFlag);

            }
        }
    }
}
